#pragma once 

#include "GameState.h"
#include "GameManagement.h"

class GameRunState : public GameState
{
protected: 
	GameManagement* _game;

public:
	GameRunState(GameManagement* game) { _game = game; }
	~GameRunState();

	virtual void update() { _game->updateGameRun(); }
	virtual void draw() { _game->drawGameRun(); }
	virtual LPWSTR getBackgroundPath() { return _IMG_BGR_RUN; }
	virtual void setInput(int keycode, bool onHold) 
	{
		switch (keycode)
		{
		case DIK_BACKSPACE:
			_game->setState(_GSTATE_MENU);
			break;
		case DIK_X:
		case DIK_Z:
		case DIK_LEFT:
		case DIK_RIGHT:
		case DIK_UP:
		case DIK_DOWN:
		case DIK_SPACE:
		case DIK_A:
		case DIK_S:
		case DIK_D:
		case DIK_1:
		case DIK_2:
		case DIK_3:
		case 0:
			_game->getGameRun()->setInput(keycode, onHold);
			break;
		}
	}
};